package start.spring.basic.flowable.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import start.spring.basic.ry.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;


/**
 * 我的流程对象 wf_apply_record
 * 
 * @author csc
 * @date 2023-12-09
 */
@Data
@TableName("wf_apply_record")
@ApiModel(value="wf_apply_record表映射对象", description="")
public class WfApplyRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "逻辑主键")
    @TableField("id")
    private String id;

    @ApiModelProperty(value = "申请人id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "申请人账号")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "申请人名称")
    @TableField("nick_name")
    @Excel(name = "申请人名称")
    private String nickName;

    @ApiModelProperty(value = "申请人所在部门id")
    @TableField("dept_ids")
    private String deptIds;

    @ApiModelProperty(value = "申请人所在部门名称")
    @TableField("dept_names")
    @Excel(name = "申请人所在部门名称")
    private String deptNames;

    @ApiModelProperty(value = "流程分类id")
    @TableField("category_id")
    private Long categoryId;

    @ApiModelProperty(value = "流程分类名称")
    @TableField("category_name")
    @Excel(name = "流程分类名称")
    private String categoryName;

    @ApiModelProperty(value = "流程定义id")
    @TableField("definition_id")
    private String definitionId;

    @ApiModelProperty(value = "流程定义名称")
    @TableField("definition_name")
    @Excel(name = "流程定义名称")
    private String definitionName;
    
    @ApiModelProperty(value = "流程版本")
    @TableField("definition_version")
    @Excel(name = "流程版本")
    private Integer definitionVersion;

    @ApiModelProperty(value = "部署id")
    @TableField("deploy_id")
    private String deployId;

    @ApiModelProperty(value = "流程实例id")
    @TableField("process_instance_id")
    private String processInstanceId;

    @ApiModelProperty(value = "填单环节对应的表单id")
    @TableField("form_id")
    private Long formId;

    @ApiModelProperty(value = "业务唯一标识")
    @TableField("business_key")
    private String businessKey;

    @ApiModelProperty(value = "摘要")
    @TableField("summary")
    @Excel(name = "摘要")
    private String summary;

    @ApiModelProperty(value = "审批状态")
    @TableField("approval_status")
    @Excel(name = "审批状态")
    private String approvalStatus;

    @ApiModelProperty(value = "申请时间")
    @TableField("apply_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyTime;

    @ApiModelProperty(value = "申请时间起")
    @TableField(exist=false)
    private String beginApplyTime;
    
    @ApiModelProperty(value = "申请时间止")
    @TableField(exist=false)
    private String endApplyTime;

    @ApiModelProperty(value = "审批完成时间")
    @TableField("approval_complete_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvalCompleteTime;

    @ApiModelProperty(value = "审批完成时间起")
    @TableField(exist=false)
    private String beginApprovalCompleteTime;
    
    @ApiModelProperty(value = "审批完成时间止")
    @TableField(exist=false)
    private String endApprovalCompleteTime;
    
    @ApiModelProperty(value = "申请记录对应的springbean的name(用于删除业务记录)")
    @TableField("bean_name")
    private String beanName;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;

	
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("userName", getUserName())
            .append("nickName", getNickName())
            .append("deptIds", getDeptIds())
            .append("deptNames", getDeptNames())
            .append("categoryId", getCategoryId())
            .append("categoryName", getCategoryName())
            .append("definitionId", getDefinitionId())
            .append("definitionName", getDefinitionName())
            .append("definitionVersion", getDefinitionVersion())
            .append("deployId", getDeployId())
            .append("processInstanceId", getProcessInstanceId())
            .append("formId", getFormId())
            .append("bussinessKey", getBusinessKey())
            .append("summary", getSummary())
            .append("approvalStatus", getApprovalStatus())
            .append("applyTime", getApplyTime())
            .append("approvalCompleteTime", getApprovalCompleteTime())
            .append("beanName", getBeanName())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
